package com.elli0tt.pojo;

import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;

/**
 * @author elli0tt
 * @version 1.0
 * @className Configuration.java
 * @description 数据库配置信息对象
 * @createTime 2020-08-28 21:45:41
 */
public class Configuration {
    /** 是否自动提交事务 */
    private boolean autoCommit = false;
    /** 数据源对象 */
    private DataSource dataSource;
    /** key: statementId (namespace.id); value: {@link MappedStatement} */
    private Map<String, MappedStatement> mappedStatementMap = new HashMap<>();

    public boolean isAutoCommit() {
        return autoCommit;
    }

    public void setAutoCommit(boolean autoCommit) {
        this.autoCommit = autoCommit;
    }

    public DataSource getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
    }

    public Map<String, MappedStatement> getMappedStatementMap() {
        return mappedStatementMap;
    }

    public void setMappedStatementMap(Map<String, MappedStatement> mappedStatementMap) {
        this.mappedStatementMap = mappedStatementMap;
    }
}
